package com.honeywen.mymvc.leetcode;

/**
 *53. 最大子序和
 * 给定一个整数数组 nums ，找到一个具有最大和的连续子数组（子数组最少包含一个元素），返回其最大和。
 *
 * 示例:
 *
 * 输入: [-2,1,-3,4,-1,2,1,-5,4],
 * 输出: 6
 * 解释: 连续子数组 [4,-1,2,1] 的和最大，为 6。
 * https://leetcode-cn.com/problems/maximum-subarray/description/
 * @author weiw@opera.com
 * @date 2018/9/3 下午6:26
 */
public class MaxSubArray {

    public static void main(String[] args) {
        System.out.println(maxSubArray(new int[]{-2,1,-3,4,-1,2,1,-5,4}));

        MaxSubArray max = new MaxSubArray();

        User user = max.new User();
        System.out.println(user);
    }

    public static int maxSubArray(int[] nums) {



        return 0;

    }

    class User {
        private int age;
        private double grade;
        private float size;

        public int getAge() {
            return age;
        }

        public void setAge(int age) {
            this.age = age;
        }

        public double getGrade() {
            return grade;
        }

        public void setGrade(double grade) {
            this.grade = grade;
        }

        public float getSize() {
            return size;
        }

        public void setSize(float size) {
            this.size = size;
        }

        @Override
        public String toString() {
            return "User{" +
                    "age=" + age +
                    ", grade=" + grade +
                    ", size=" + size +
                    '}';
        }
    }


}
